{{!
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements.  See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership.  The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License.  You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
}}

<div class="step3">
  <h2>{{t widget.create.wizard.step3.header}}</h2>

  <form>
    <div class="row-fluid">
      <div class="span2 title">{{t widget.create.wizard.step3.widgetName}}<i class="icon-asterisk"></i></div>
      <div {{bindAttr class=":span10 isNameInvalid:error"}}>
        {{view Ember.TextField valueBinding="widgetName"}}
        {{#if isNameInvalid}}
          <div>{{t widget.create.wizard.step3.name.invalid.msg}}</div>
        {{/if}}
      </div>
    </div>

    <div class="row-fluid">
      <div class="span2 title">{{t common.author}}</div>
      <div class="span10">{{widgetAuthor}}</div>
    </div>

    <div class="row-fluid">
      <div class="span2 title">{{t widget.create.wizard.step3.sharing}}</div>
      <div class="span10">
        <label class="checkbox">
          {{view Ember.Checkbox disabledBinding="controller.isSharedCheckboxDisabled" checkedBinding="controller.isSharedChecked"}} &nbsp;
          {{t widget.create.wizard.step3.sharing.msg}}
        </label>
      </div>
    </div>

    <div class="row-fluid">
      <div class="span2 title">{{t common.description}}</div>
      <div {{bindAttr class=":span10 isDescriptionInvalid:error"}}>
        {{view Ember.TextArea valueBinding="widgetDescription" class="description-text-area"}}
        {{#if isDescriptionInvalid}}
          <div>{{t widget.create.wizard.step3.description.invalid.msg}}</div>
        {{/if}}
      </div>
    </div>

  </form>

  <div class="btn-area">
    <button id="add-widget-step3-back" class="btn" {{action back}}>&larr; {{t common.back}}</button>
    <button id="add-widget-step3-save" class="btn btn-success pull-right" {{bindAttr disabled="isSubmitDisabled"}} {{action "complete" target="controller"}}>{{t common.save}}</button>
    <button id="add-widget-step3-cancel" class="btn pull-right" {{action "cancel" target="controller"}}>{{t common.cancel}}</button>
  </div>
</div>